import axios from "../../utils/axios";
/**
 *  2.0版本
 */

/* ----------------------------------新--------------------------------------------*/

// 商品分类获取  分页
export function getCommodityCategory(query) {
    return axios({
        url: "/goldendays-goods/classification/getCommodityCategory",
        method: "get",
        params: query
    });
}
// 新增或修改分类 2.0版本
export function addOrUpdateCommodityCategory(query) {
    return axios({
        url: "/goldendays-goods/classification/addOrUpdateCommodityCategory",
        method: "post",
        data: query
    });
}

// 删除分类 2.0版本
export function deleteCategory(data) {
    return axios({
        url: "goldendays-goods/classification/deleteCategory",
        method: "post",
        params: data
    });
}
//分类 无分页
export function getCategory(query) {
    return axios({
        url: "goldendays-goods/classification/getCategory",
        method: "get",
        params: query
    });
}

// /template/bindMerchantTemplate 绑定模板
export function bindMerchantTemplate(query) {
    return axios({
        url: "goldendays-goods/classification/bindMerchantTemplate",
        method: "post",
        data: query
    });
}
// /template/findTemplateList 分页获取模板列表
export function findTemplateList(query) {
    return axios({
        url: "goldendays-goods/template/findTemplateList",
        method: "get",
        params: query
    });
}
/* ----------------------------------新--------------------------------------------*/


// /entityBusiness/getCheckUser总后台体验商城申请列表
export function getCheckUser(query) {
    return axios({
        url: "/goldendays-user/entityBusinessUser/getCheckUser",
        method: "post",
        data: query
    });
}
// /entityBusiness/getCertificationInfoList  正式商城申请--查看经营类目审核列表
export function getCertificationInfoList(query) {
    return axios({
        url: "/goldendays-user/entityBusiness/getCertificationInfoList",
        method: "post",
        data: query
    });
}
// /entityBusiness/merchantsCertificationAudit 正式商城申请--查看经营类目审核列表--商家资质审核
export function merchantsCertificationAudit(query) {
    return axios({
        url: "/goldendays-user/entityBusiness/merchantsCertificationAudit",
        method: "post",
        data: query
    });
}
// /entityBusiness/updateCheckEntityStatus 总后台体验商城申请审核接口
export function updateCheckEntityStatus(query) {
    return axios({
        url: "/goldendays-user/entityBusiness/updateCheckEntityStatus",
        method: "post",
        data: query
    });
}

//  entityBusiness/merchantsCommodityList    //商户审核商品列表
export function merchantsCommodityList(query) {
    return axios({
        url: "/goldendays-goods/busCommodityMgr/merchantsCommodityList",
        method: "post",
        params: query
    });
}


// 新次级列表查询 /Classification/getCommoditySublevelList获取商品次级分类列表
export function getCommoditySublevelList(query) {
    return axios({
        url: "goldendays-goods/classification/getCommoditySublevelList",
        method: "get",
        params: query
    });
}

// 一级列表
export function getTopList(query) {
    return axios({
        url: "goldendays-goods/classification/getTopList",
        method: "get",
        params: query
    });
}

// 添加一二三级添加
export function addCategory(data) {
    return axios({
        url: "/Classification/addCategory",
        method: "post",
        data: data
    });
}

// /settled/getDetailInfo 查看商家入驻申请信息
export function getDetailInfo(query) {
    return axios({
        url: "/goldendays-user/settled/getDetailInfo",
        method: "get",
        params: query
    });
}
// /settled/audit 审核接口
export function audit(query) {
    return axios({
        url: "/goldendays-user/settled/audit",
        method: "post",
        data: query
    });
}
// /settled/getDetailById 根据类名id获取类目名称
export function getDetailById(query) {
    return axios({
        url: "/goldendays-user/settled/getDetailById",
        method: "get",
        params: query
    });
}

// 添加编辑模板接口
export function addOrEditTemplate(query) {
    return axios({
        url: '/goldendays-goods/template/addOrEditTemplate',
        method: 'post',
        data: query
    })
}

// 获取模板列表
export function getTemplateList(query) {
    return axios({
        url: '/goldendays-goods/template/findTemplateList',
        method: 'get',
        params: query
    })
}

// /attributesTemplate/addOrUpdateAttributesTemplate 新增、编辑商品属性模板
export function addOrUpdateAttributesTemplate(param) {
    return axios({
        url: '/goldendays-goods/attributesTemplate/addOrUpdateAttributesTemplate',
        method: 'post',
        data: param
    })
}

// /attributesTemplate/queryAttributesTemplateHDPage 查询商品属性模板列表
export function queryAttributesTemplateList(param) {
    return axios({
        url: '/goldendays-goods/attributesTemplate/queryAttributesTemplateHDPage',
        method: 'get',
        params: param
    })
}
// /classification/bindAttributesTemplate 绑定商品属性模板
export function bindAttributesTemplate(param) {
    return axios({
        url: '/goldendays-goods/classification/bindAttributesTemplate',
        method: 'post',
        data: param
    })
}

// /classification/queryAttributesById  根据商品分类id查询详情
export function queryAttributesById(param) {
    return axios({
        url: '/goldendays-goods/classification/queryAttributesById',
        method: 'get',
        params: param
    })
}

// /attributesTemplate/queryAttributesTemplateItem 根据属性模板id查询属性模板信息
export function queryAttributesTemplateInfo(param) {
    return axios({
        url: '/goldendays-goods/attributesTemplate/queryAttributesTemplateItem',
        method: 'get',
        params: param
    })
}

// 主营商品审核招商   /busCommodityMgr/mainCommodityAudit  主营商品审核（招商/品控）

export function getMainCommodityAudit(param) {
    return axios({
        url: '/goldendays-goods/busCommodityMgr/mainCommodityAudit',
        method: 'post',
        params: param
    })
}
///busCommodityMgr/mainCommodityToExamine 主营商品审核
export function mainCommodityToExamine(data) {
    return axios({
        url: '/goldendays-goods/busCommodityMgr/mainCommodityToExamine',
        method: 'post',
        data: data
    })
}
///busCommodityMgr/queryCommodityAuditList 商品审核驳回列表

export function queryCommodityAuditList(param) {
    return axios({
        url: '/goldendays-goods/busCommodityMgr/queryCommodityAuditList',
        method: 'post',
        params: param
    })
}